<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>flex左中右布局，中间自适应</title>

    <style>
        body,
        html {
            margin: 0;
            padding: 0;
            height: 100%;
        }

        .box {
            text-align: center;
            display: flex;
            width: 100%;
            height: 100%;
        }

        .left {
            background-color: aquamarine;
            /* width: 220px; */
            flex: 1;
        }

        .middle {
            background-color: bisque;
            flex: 2;
        }

        .right {
            background-color: chocolate;
            /* width: 200px; */
            flex: 1;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="left">left</div>
        <div class="middle">middle</div>
        <div class="right">right</div>
    </div>
</body>

</html>